<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.enterprise.domain.Feedback"%>
<%@page import="com.enterprise.daoImpl.FeedbackDaoImpl"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="Inc/Head.jsp" %>

<script language="javascript">
<!--  
  if (window == top)top.location.href = "Default.asp"; 
// -->
</script>

<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗？"))
     return true;
   else
     return false;
}
</script>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> <br> 
            <div align="center"><strong>留言管理 <br>
              </strong></div></td>
      </tr>
   </table>
         <%
 	FeedbackDaoImpl feedbackDaoImpl=new FeedbackDaoImpl();
 	List<Feedback> feedbacks=feedbackDaoImpl.getFeedbackAll();
 	if(feedbacks!=null&&feedbacks.size()>0)
 	for(Feedback feedback:feedbacks){
 	if(feedback.getClassName().equals("-1")){
  %>
  <table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td> 
<div align="center"> 

              <table  width="560" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000" >
                <tr bgcolor="#A4B6D7"> 
                  <td width="18%" height="25"> <div align="center"> 
                      
                      [管理员公告] 
                      
                    </div></td>
                  <td width="82%">&nbsp;&nbsp;<%=feedback.getContact() %> &nbsp; <a href="<%=basePath %>feedback-delete.action?id=<%=feedback.getId() %>" onClick="return ConfirmDel();">删除</a>&nbsp;&nbsp;&nbsp;&nbsp; 
                    <a href="Admin_FeedbackRe.asp?id=99"> 
                     </td>
                </tr>
                
                <tr bgcolor="#A4B6D7">
                  <td height="25" bgcolor="#ECF5FF"><div align="center">手机</div></td>
                  <td height="25" bgcolor="#ECF5FF">&nbsp;&nbsp;<%=feedback.getMobile()!=null?feedback.getMobile():"" %></td>
                </tr>
                <tr bgcolor="#A4B6D7"> 
                  <td height="25"> <div align="center">主 题</div></td>
                  <td height="25">&nbsp;&nbsp;<%=feedback.getTheme() %>&nbsp;&nbsp;[<%=new SimpleDateFormat("yyyy-MM-dd").format(feedback.getBtime()) %>]</td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="25"> <div align="center">内 容</div></td>
                  <td height="25">&nbsp;&nbsp;<%=feedback.getContent() %></td>
                </tr>
                
              </table>
            </div></td>
        </tr>
      </table>
      <br> 
      <%}else{ %>
      
      <table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><div align="center">
              
              <table  width="560" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000" >
                <tr bgcolor="#A4B6D7"> 
                  <td width="18%" height="25"> <div align="center"> 
                      
                      用户名 
                      
                    </div></td>
                  <td width="82%">&nbsp;&nbsp;未注册用户 &nbsp; <a href="<%=basePath %>feedback-delete.action?id=<%=feedback.getId() %>" onClick="return ConfirmDel();">删除</a>&nbsp;&nbsp;&nbsp;&nbsp; 
                    <a href="Admin_FeedbackRe.jsp?id=<%=feedback.getId()%>"> 
                    回复
                    </a>  </td>
                </tr>
                
                <tr bgcolor="#ECF5FF"> 
                  <td height="10"> <div align="center">公司名称</div></td>
                  <td>&nbsp;&nbsp;<%=feedback.getCompany() %></td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="10"> <div align="center">联系人</div></td>
                  <td>&nbsp;&nbsp;<%=feedback.getContact() %></td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="22"> <div align="center">联系电话</div></td>
                  <td>&nbsp;&nbsp;<%=feedback.getTelephone() %></td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="22"> <div align="center">联系传真</div></td>
                  <td>&nbsp;&nbsp;<%=feedback.getFex() %></td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="22" bgcolor="#ECF5FF"> 
                    <div align="center">E-mail</div></td>
                  <td><a href="AdminMaillist.asp?email=a">&nbsp;&nbsp;<%=feedback.getEmail() %></a></td>
                </tr>
                
                <tr bgcolor="#A4B6D7">
                  <td height="25" bgcolor="#ECF5FF"><div align="center">手机</div></td>
                  <td height="25" bgcolor="#ECF5FF">&nbsp;&nbsp;<%=feedback.getMobile() %></td>
                </tr>
                <tr bgcolor="#A4B6D7"> 
                  <td height="25"> <div align="center">主 题</div></td>
                  <td height="25">&nbsp;&nbsp;<%=feedback.getTheme() %>&nbsp;&nbsp;[<%=new SimpleDateFormat("yyyy-MM-dd").format(feedback.getBtime()) %>]</td>
                </tr>
                <tr bgcolor="#ECF5FF"> 
                  <td height="25"> <div align="center">内 容</div></td>
                  <td height="25">&nbsp;&nbsp;<%=feedback.getContent() %></td>
                </tr>
                
                <tr bgcolor="#ECF5FF"> 
                  <td height="22"> <div align="center">回复内容</div></td>
                  <td height="22">&nbsp;&nbsp;<%=feedback.getFeedback()==null?"":feedback.getFeedback() %></td>
                </tr>
                
              </table>
            </div></td>
        </tr>
      </table>
      <br>
      <%}} %>
      
       
      
      <br> <br> </td>
  </tr>
</table>


       

<%@ include file="Inc/Foot.jsp"%>